function [ startValsBelowSysAxis, endValsBelowSysAxis ] = sepValsBelowSysAxis( valsBelowSysAxis, globalMaxIdx )
%UNTITLED2 Summary of this function goes here
%   Detailed explanation goes here

%Separates the values below the x-axis into those that occur at the
%beginning of systole and those that occur at the end of systole
size_valsBelowSysAxis = size(valsBelowSysAxis);
startValsBelowSysAxis = [];
endValsBelowSysAxis = [];

for i=1:size_valsBelowSysAxis(1)
    
    if valsBelowSysAxis(i,1) < globalMaxIdx;
        
        startValsBelowSysAxis = [startValsBelowSysAxis;valsBelowSysAxis(i,:)];
        
    else
        endValsBelowSysAxis = [endValsBelowSysAxis;valsBelowSysAxis(i,:)];
        
    end
    
end

end

